@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-ubuntu);
  --font-mono: var(--font-geist-mono);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}

:root {
  --radius: 0.625rem;
  --background: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --foreground: oklch(0.271 0.078 258.95); /* Navy - #102C57 */
  --card: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --card-foreground: oklch(0.271 0.078 258.95); /* Navy - #102C57 */
  --popover: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --popover-foreground: oklch(0.271 0.078 258.95); /* Navy - #102C57 */
  --primary: oklch(0 0 0); /* Black - #000000 */
  --primary-foreground: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --secondary: oklch(0.818 0.055 76.01); /* Tan - #DAC0A3 */
  --secondary-foreground: oklch(0 0 0); /* Black - #000000 */
  --muted: oklch(0.918 0.036 82.64); /* LightBeige - #EADBC8 */
  --muted-foreground: oklch(0.271 0.078 258.95); /* Navy - #102C57 */
  --accent: oklch(0.818 0.055 76.01); /* Tan - #DAC0A3 */
  --accent-foreground: oklch(0 0 0); /* Black - #000000 */
  --destructive: oklch(0.698 0.232 13.06); /* Existing Red */
  --destructive-foreground: oklch(
    0.959 0.021 13.2
  ); /* Existing Light text for destructive */
  --border: oklch(0.918 0.036 82.64); /* LightBeige - #EADBC8 (Softer Border) */
  --input: oklch(0.918 0.036 82.64); /* LightBeige - #EADBC8 */
  --ring: oklch(0 0 0); /* Black - #000000 */
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --background: oklch(0.271 0.078 258.95); /* Navy - #102C57 */
  --foreground: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --card: oklch(
    0.314 0.076 259.41
  ); /* Darker Navy variant for cards - e.g. #1A3A6D */
  --card-foreground: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --popover: oklch(0.314 0.076 259.41); /* Darker Navy variant for popovers */
  --popover-foreground: oklch(0.991 0.005 91.88); /* Ivory - #FEFAF6 */
  --primary: oklch(
    0.991 0.005 91.88
  ); /* Ivory - #FEFAF6 (Light primary for dark bg) */
  --primary-foreground: oklch(
    0 0 0
  ); /* Black - #000000 (Text on light primary) */
  --secondary: oklch(0.818 0.055 76.01); /* Tan - #DAC0A3 */
  --secondary-foreground: oklch(0 0 0); /* Black - #000000 */
  --muted: oklch(
    0.352 0.073 259.88
  ); /* Even Darker Navy/Slate for muted elements - e.g. #2A4A7D */
  --muted-foreground: oklch(0.918 0.036 82.64); /* LightBeige - #EADBC8 */
  --accent: oklch(0.818 0.055 76.01); /* Tan - #DAC0A3 */
  --accent-foreground: oklch(0 0 0); /* Black - #000000 */
  --destructive: oklch(0.698 0.232 13.06); /* Consistent Destructive Red */
  --destructive-foreground: oklch(
    0.991 0.005 91.88
  ); /* Ivory for destructive text in dark mode */
  --border: oklch(
    0.818 0.055 76.01
  ); /* Tan - #DAC0A3 (Tan border for contrast on Navy) */
  --input: oklch(
    0.352 0.073 259.88
  ); /* Even Darker Navy/Slate for input backgrounds */
  --ring: oklch(
    0.991 0.005 91.88
  ); /* Ivory - #FEFAF6 (For focus rings on Navy) */
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.556 0 0);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground font-sans;
  }
}

/* Add animation keyframes and classes for the scrolling effect */

@keyframes scrollX {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes scrollXReverse {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0);
  }
}

.animate-scrollX {
  animation: scrollX 60s linear infinite;
}

.animate-scrollXReverse {
  animation: scrollXReverse 60s linear infinite;
}

/* Subtle Noise Texture Utility */
.bg-noise-ivory {
  position: relative;
  background-color: var(--background); /* Ensure base color is set */
}

.bg-noise-ivory::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow interaction with content below */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03; /* Adjust for desired subtlety */
  z-index: 0; /* Ensure it's behind content but covers background */
}

/* Subtle Noise Texture using CSS Gradients (Experimental) */
.bg-noise-gradient-ivory {
  position: relative;
  background-color: var(--background);
}

.bg-noise-gradient-ivory::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Attempting a very fine, layered gradient to simulate noise */
  /* This is experimental and might need @property for animation or better control */
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.1) 0.0001px,
      transparent 0.0001px,
      transparent 0.0002px
    ),
    repeating-linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.1) 0.0001px,
      transparent 0.0001px,
      transparent 0.0002px
    );
  opacity: 0.5; /* Opacity of the noise layer itself */
  mix-blend-mode: overlay; /* Added mix-blend-mode */
  z-index: 0;
}
